<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <h3 style="color:red">我是样式</h3>
        <h3 :style="mystyle">我也是样式</h3>
        <h3 :style="{color:color,border:'1px solid red'}">对象的样式</h3>
        <h3 :style="[mystyle1,mystyle2]">集合样式</h3>
        <button @click="change">改变</button>
    </div>
    
</body>
<script>
    new  Vue({
        el:"#app",
        data:{
            mystyle:"color:green",
            color:"red",
            mystyle1:{
                color:"red"
            },
            mystyle2:{
                "backgroundColor":"green"
            }
        },
        methods:{
            change(){
                this.color="green";
                this.mystyle1.color="yellow";
            }
        }


    })

</script>
</html>